def solve():
    N = int(input())
    A = list(map(int, input().split()))
    
    # 初始化差分数组
    diff = [0] * (N + 1)
    
    # 构建差分数组
    for i in range(N):
        if i > 0:
            diff[i] += 1  # 每个外星人在成年前一年收到一块石头
        if i < N - 1:
            diff[i + 1] -= 1  # 成年后不再收到石头
    
    # 累加差分数组得到最终结果
    B = [0] * N
    B[0] = A[0]
    for i in range(1, N):
        B[i] = B[i - 1] + diff[i] + A[i]
    
    print(*B)

solve()